package com.googlecode.imanager.jasper.form;

import net.sf.jasperreports.engine.JRDefaultStyleProvider;

import com.googlecode.imanager.client.bridge.form.IButton;
import com.googlecode.imanager.client.form.Button;
import com.googlecode.imanager.core.base.BridgeApplication;
import com.googlecode.imanager.jasper.print.RText;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public class RButton extends RFocusControl implements IButton {

    public RButton(BridgeApplication bridge, Button source) {
        super(bridge, source);
    }

    @Override
    protected RText createTarget() {
        return new RText(this);
    }

    @Override
    public RText getTarget() {
        return (RText) target;
    }

    @Override
    public void setDefaultStyleProvider(JRDefaultStyleProvider defaultStyleProvider) {
        getTarget().setDefaultStyleProvider(defaultStyleProvider);
    }

    @Override
    public void setText(String text) {
        getTarget().setText(text);
    }

}
